As has been discussed before in the Notes 4/5 forum, if a document appears multiple times in a view, the values of the columns are each calculated just once, not once for each appearance. Therefore there is no way for a column formula to tell which category it's in "this time" -- it's in all of them at once.
You can work around this in one of two ways:
- combine the two columns into one column, concatenating the values with a formula such as field1 + "\\" + field2 (if the view is categorized), or field1 + ": " + field2 (if using "multiple values on separate rows" or if you just prefer the look).
- turn off categorization and "multiple values on separate rows". Use "newline" as the multivalue separator. Set the view formatting to display multiple lines per row and shrink rows to content. Use same height font in the multivalue columns, and make the columns wide enough so that the values don't wrap. The result will not be sorted and you can't display more than the first 9 rows, but the data should line up, anyway.